#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n = 0;
	int i = 0;
	int j = 0;
	double sum = 1;
	int nn = 1;
	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		for (j = 1; j<=i; j++)
		{
			nn = nn * j;
		}
		sum += 1.0 / nn;
	}
	printf("%.8f", sum);
	return 0;
}